<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j">

<rich:tabPanel id="subTabs" switchType="ajax" selectedTab="#{editPerson.selectedTabUpd}">
				<rich:tab label="Personas" switchType="ajax" id="updPersonSub" ajaxSingle="true">
					<a4j:form id="updPersonForm" ajaxSingle="true">
				
					<!-- ************************************ -->
					<!-- *****  MODIFICAR PERSONA  ***** -->
					<!-- ************************************ -->
					
						<rich:panel  styleClass="form">
						<a4j:outputPanel id="ToMsg"> 
							<h:messages globalOnly="false" styleClass="message"/>
						</a4j:outputPanel>
						<f:facet name="header"><h:outputText value="Datos de la Persona" /></f:facet>
							<h:panelGrid>
								<div class="attributes">
									<s:decorate template="/layout/input.xhtml">
										<ui:define name="label">Codigo</ui:define>
										<h:inputText styleClass="upper" id="PersonCode" maxlength="20"
											value="#{editPerson.person.cod}"
										    size="5"
											validatorMessage="El codigo no puede ser menor a 3 o mayor a 5">
											<f:validateLength minimum="3" maximum="5" />
											<a4j:support event="onblur" />
										</h:inputText>
										<div class="msg_container">
											<rich:message for="PersonCode" />
										</div>
									</s:decorate>
									<div style="clear: both;" />
			
									<s:decorate template="/layout/input.xhtml">
										<ui:define name="label">Nombre</ui:define>
										<h:inputText styleClass="upper" id="PersonName" maxlength="100"
											value="#{editPerson.person.name}"
										    size="50"
											validatorMessage="El nombre no puede ser menor a 3 o mayor a 100">
											<f:validateLength minimum="3" maximum="100" />
											<a4j:support event="onblur" />
											
										</h:inputText>
										<div class="msg_container">
											<rich:message for="PersonName" />
										</div>
									</s:decorate>
			
										
									<div style="clear: both;" />
									<s:decorate template="/layout/input.xhtml">
										<ui:define name="label">R.U.C.</ui:define>
										<h:inputText styleClass="upper" id="PersonRUC" maxlength="16"
											value="#{editPerson.person.ruc}"
											required="false" size="16"
											validatorMessage="El RUC debe tener 16 caracteres">
											<f:validateLength minimum="7" maximum="16" />
											<a4j:support event="onblur" />
										</h:inputText>
										<div class="msg_container">
											<rich:message for="PersonRUC" />
										</div>
									</s:decorate>
			
			
									<div style="clear: both" />
									<s:decorate template="/layout/input.xhtml">
										<ui:define name="label">Persona Juridica</ui:define>
										<h:selectOneMenu id="PersonIsJuridic" value="#{editPerson.person.isJurS}">
											<f:selectItem itemValue=""/>
											<f:selectItem itemLabel="Activo" itemValue="S" />
											<f:selectItem itemLabel="Inactivo" itemValue="N"/>
											<a4j:support event="onblur" />
										</h:selectOneMenu>
										
									</s:decorate>
										
									<div style="clear: both" />
									<s:decorate template="/layout/input.xhtml">
										<ui:define name="label">Activo</ui:define>
										<h:selectOneMenu id="PersonIsActive" value="#{editPerson.person.statusS}" >
										    <f:selectItem itemValue=""/>
											<f:selectItem itemLabel="Activo" itemValue="S" />
											<f:selectItem itemLabel="Inactivo" itemValue="N"/>
											<a4j:support event="onblur" />
											
										</h:selectOneMenu>
									</s:decorate>
									<div style="clear: both" />
								</div>
							
									
									<s:decorate template="/layout/displayButton.xhtml" styleClass="button_form">
										<a4j:commandButton value="Buscar"
											action="#{editPerson.searchPerson(editPerson.person)}"
											styleClass="button" reRender="updPersonGridForm, updPersonForm"
											oncomplete="window.location.reload()">
					
										</a4j:commandButton>
										<rich:spacer width="20px" />
										<a4j:commandButton value="Cancelar"
											action="#{editPerson.cancelData()}"
											reRender="updPersonForm" styleClass="button"
											oncomplete="window.location.reload()"/>
					
									</s:decorate>
									
								</h:panelGrid>
								
						</rich:panel>
					</a4j:form>
					
					<a4j:form id="updPersonGridForm" ajaxSingle="true">
						<rich:datascroller align="center" for="updPersonGrid"
							maxPages="15" page="#{dataTableScrollerBean.scrollerPage}"
							renderIfSinglePage="false" />
								   			
						<div style="clear: both;" />
						<rich:panel styleClass="table_add" rendered="#{not empty editPerson.personSearch}">
						<rich:dataTable id="updPersonGrid"
							var="person" rows="3"
							value="#{editPerson.personSearch}"
							rendered="#{not empty editPerson.personSearch}"
							rowClasses="rvgRowOne,rvgRowTwo"
							style="width:70%; margin-left:15%;">
							
							<rich:column>
								<f:facet name="header"><h:outputText value="Cod Persona." /></f:facet>
								
								<h:outputText value="#{person.cod}" />
							</rich:column>
			
							<rich:column>
								<f:facet name="header"><h:outputText value="Nombre" /></f:facet>
								
								<h:outputText value="#{person.name}" />
							</rich:column>
							
							<rich:column>
								<f:facet name="header"><h:outputText value="RUC" /></f:facet>
								
								<h:outputText value="#{person.ruc}" />
							</rich:column>
							
							<rich:column>
								<f:facet name="header"><h:outputText value="JURIDICA" /></f:facet>
								
								<h:outputText value="#{convertAssist.booleanToString(person.isJur)}" />
							</rich:column>
							
							<rich:column>
								<f:facet name="header"><h:outputText value="ACTIVO" /></f:facet>
								
								<h:outputText value="#{convertAssist.booleanToString(person.status)}" />
							</rich:column>
			
							
			
							<rich:column>
								<f:facet name="header"><h:outputText value="Operaciones" /></f:facet>
								
								<a4j:commandButton id="PersonDelete" value="Borrar" ajaxSingle="true"
									action="#{editPerson.personToDelete(person.id)}"
									image="/img/icons/delete_data.png"
									onclick="if (!confirm('Esta usted seguro que quiere borrar el registro ?')) return false" 
									reRender="updPersonGridForm"/>
								<rich:toolTip value="Borrar" for="PersonDelete" />
								<rich:spacer width="20" />
								
								<a4j:commandLink id="PersonEdit"  action="#{editPerson.personToEdit(person.id)}" ajaxSingle="true"
									oncomplete="#{rich:component('PersonModalPanel')}.show()"
									reRender="PersonModalPanel"
									>
		
									<h:graphicImage id="PersonDeleteImg" url="/img/icons/edit.png"
										styleClass="actionsImages" />
								</a4j:commandLink>
								<rich:toolTip value="Editar Persona" for="PersonEdit" />
								<rich:spacer width="20" />
								
								<h:commandLink id="PersonEditAddress"  action="#{editPerson.searchAddress(person)}"
									reRender="subTabs"
									immediate="true">
									<a4j:support event="onclick" action="#{editPerson.changeUpdTab('updPersonAddr')}"></a4j:support>
									<h:graphicImage id="PersonEditAddressImg" url="/img/icons/home.png"
										styleClass="actionsImages" />
								</h:commandLink>
								<rich:toolTip value="Modificar Direcciones" for="PersonEditAddress" />
								<rich:spacer width="20" />
								
								<h:commandLink id="PersonEditDoc"  action="#{editPerson.searchDocument(person)}"
									reRender="subTabs"
									immediate="true">
									<a4j:support event="onclick" action="#{editPerson.changeUpdTab('updPersonDoc')}"></a4j:support>
									<h:graphicImage id="PersonEditDocImg" url="/img/icons/id_card.png"
										styleClass="actionsImages" />
								</h:commandLink>
								<rich:toolTip value="Modificar Documentos" for="PersonEditDoc" />
								<rich:spacer width="20" />
								
								<h:commandLink id="PersonEditPhone"  action="#{editPerson.searchPhone(person)}"
									reRender="subTabs"
									immediate="true">
									<a4j:support event="onclick" action="#{editPerson.changeUpdTab('updPersonPhone')}"></a4j:support>
									<h:graphicImage id="PersonEditPhoneImg" url="/img/icons/mobile.png"
										styleClass="actionsImages" />
								</h:commandLink>
								<rich:toolTip value="Modificar Telefonos" for="PersonEditPhone" />
								
							</rich:column>
			
						</rich:dataTable>
						</rich:panel>
					
					</a4j:form>
					
					
					<rich:modalPanel  id="PersonModalPanel" minwidth="800" minheight="300"
						resizeable="false" autosized="true" >
						<f:facet name="header">
							<h:panelGroup>
								<h:outputText value="Actualizar Persona" />
							</h:panelGroup>
						</f:facet>
						<f:facet name="controls">
							<h:panelGroup>
								<h:graphicImage value="/img/close.png" style="cursor:pointer"
									id="hideEditApp" />
								<rich:componentControl for="PersonModalPanel"
									attachTo="hideEditApp" operation="hide" event="onclick" />
							</h:panelGroup>
						</f:facet>
						<h:panelGroup id="idEditGroup">
						<!--  **** Include of the update page ****  -->
							<a4j:include viewId="/fms/fms/maintenances/fmsPersonEdit.xhtml" />
						</h:panelGroup>
					</rich:modalPanel>
				</rich:tab>
				
				<rich:tab label="Direcciones" switchType="ajax" id="updPersonAddr" immediate="true" ajaxSingle="true">
					<a4j:form id="updPersonAddressForm" ajaxSingle="true">
						<a4j:outputPanel id="ToMsg"> 
							<h:messages globalOnly="false" styleClass="message"/>
						</a4j:outputPanel>
				
					<!-- ************************************ -->
					<!-- *****  MODIFICAR DIRECCION ***** -->
					<!-- ************************************ -->
					
						<rich:panel  styleClass="form">
						<f:facet name="header"><h:outputText value="Filtros" /></f:facet>
							<h:panelGrid>
								<div class="attributes">
									<s:decorate template="/layout/input.xhtml">
										<ui:define name="label">Codigo</ui:define>
										<h:inputText styleClass="upper" id="PersonAddrCode" maxlength="20"
											value="#{editPerson.person.cod}"
											required="true"
											requiredMessage="Favor introduzca un codigo"
										    size="5"
											validatorMessage="El codigo no puede ser menor a 3 o mayor a 5">
											<f:validateLength minimum="3" maximum="5" />
											<a4j:support event="onblur"></a4j:support>
										</h:inputText>
										<div class="msg_container">
											<rich:message for="PersonAddrCode" />
										</div>
									</s:decorate>
									<div style="clear: both;" />
									
									<h:commandButton value="Volver a persona"
										reRender="subTabs"
										immediate="true">
										<a4j:support event="onclick" action="#{editPerson.changeUpdTab('updPerson')}"></a4j:support>
									</h:commandButton>
			
									
								</div>
							
									
									<s:decorate template="/layout/displayButton.xhtml"	styleClass="button_form">
										<a4j:commandButton value="Buscar" ajaxSingle="true"
											action="#{editPerson.searchAddress(editPerson.person)}"
											styleClass="button" reRender="updAddrGridForm, updPersonAddressForm">
					
										</a4j:commandButton>
										<rich:spacer width="20px" />
										<a4j:commandButton value="Cancelar"
											action="#{editPerson.cancelData()}"
											reRender="updPersonAddressForm" styleClass="button"
											oncomplete="window.location.reload()"/>
					
									</s:decorate>
									
								</h:panelGrid>
								
						</rich:panel>
					</a4j:form>
					
					<a4j:form id="updAddrGridForm" ajaxSingle="true">
						<rich:datascroller align="center" for="updPersonAddrGrid"
							maxPages="15" page="#{dataTableScrollerBean.scrollerPage}"
							renderIfSinglePage="false" />
								   			
						<div style="clear: both;" />
						<rich:panel styleClass="table_add" rendered="#{not empty editPerson.personAddrSearch}">
						<rich:dataTable id="updPersonAddrGrid"
							var="addr" rows="3"
							value="#{editPerson.personAddrSearch}"
							rendered="#{not empty editPerson.personAddrSearch}"
							rowClasses="rvgRowOne,rvgRowTwo"
							style="width:70%; margin-left:15%;">
							
							<rich:column>
								<f:facet name="header"><h:outputText value="Tipo Direc." /></f:facet>
								
								<h:outputText value="#{convertAssist.getRefDetDescrip(addr.idAddressType)}" />
							</rich:column>
			
							<rich:column>
								<f:facet name="header"><h:outputText value="Direccion" /></f:facet>
								
								<h:outputText value="#{addr.address}" />
							</rich:column>
							
							<rich:column>
								<f:facet name="header"><h:outputText value="Activo" /></f:facet>
								
								<h:outputText value="#{convertAssist.booleanToString(addr.status)}" />
							</rich:column>
							
							<rich:column>
								<f:facet name="header"><h:outputText value="Primario" /></f:facet>
								
								<h:outputText value="#{convertAssist.booleanToString(addr.isDefault)}" />
							</rich:column>
			
							
			
							<rich:column>
								<f:facet name="header"><h:outputText value="Operaciones" /></f:facet>
								
								<a4j:commandButton id="AddressDelete" value="Borrar"
									action="#{editPerson.addressToDelete(addr.id)}"
									image="/img/icons/delete_data.png"
									onclick="if (!confirm('Esta usted seguro que quiere borrar el registro ?')) return false" 
									reRender="updAddrGridForm"/>
								<rich:toolTip value="Borrar" for="AddressDelete" />
								<rich:spacer width="20" />
								<a4j:commandLink id="AddressEdit"  action="#{editPerson.addressToEdit(addr.id)}"
									oncomplete="#{rich:component('PersonAddressModalPanel')}.show()"
									reRender="PersonAddressModalPanel"
									immediate="true">
		
									<h:graphicImage id="AddressDeleteImg" url="/img/icons/edit.png"
										styleClass="actionsImages" />
								</a4j:commandLink>
								<rich:toolTip value="Editar Persona" for="AddressEdit" />
								
								
								
							</rich:column>
			
						</rich:dataTable>
						</rich:panel>
					
					</a4j:form>
					
					
					<rich:modalPanel  id="PersonAddressModalPanel" minwidth="800" minheight="300"
						resizeable="false" autosized="true" >
						<f:facet name="header">
							<h:panelGroup>
								<h:outputText value="Actualizar Direccion" />
							</h:panelGroup>
						</f:facet>
						<f:facet name="controls">
							<h:panelGroup>
								<h:graphicImage value="/img/close.png" style="cursor:pointer"
									id="hideEditAddr" />
								<rich:componentControl for="PersonAddressModalPanel"
									attachTo="hideEditAddr" operation="hide" event="onclick" />
							</h:panelGroup>
						</f:facet>
						<h:panelGroup id="GroupAddr">
						<!--  **** Include of the update page ****  -->
							<a4j:include viewId="/fms/fms/maintenances/fmsPersonAddressEdit.xhtml" />
						</h:panelGroup>
					</rich:modalPanel>
				</rich:tab>
				
				<rich:tab label="Documentos" switchType="ajax" id="updPersonDoc" ajaxSingle="true">
					<a4j:form id="updPersonDocForm" ajaxSingle="true">
					<a4j:outputPanel id="ToMsg"> 
						<h:messages globalOnly="false" styleClass="message"/>
					</a4j:outputPanel>
					<!-- ************************************ -->
					<!-- *****  DOCUMENTS UPDATE ***** -->
					<!-- ************************************ -->
					
						<rich:panel  styleClass="form">
						<f:facet name="header"><h:outputText value="Filtros" /></f:facet>
							<h:panelGrid>
								<div class="attributes">
									<s:decorate template="/layout/input.xhtml">
										<ui:define name="label">Codigo</ui:define>
										<h:inputText styleClass="upper" id="PersonDocCode" maxlength="20"
											value="#{editPerson.person.cod}"
											required="true"
											requiredMessage="Favor introduzca un codigo"
										    size="5"
											validatorMessage="El codigo no puede ser menor a 3 o mayor a 5">
											<f:validateLength minimum="3" maximum="5" />
											<a4j:support event="onblur"></a4j:support>
										</h:inputText>
										<div class="msg_container">
											<rich:message for="PersonDocCode" />
										</div>
									</s:decorate>
									<div style="clear: both;" />
									
									<h:commandButton value="Volver a persona"
										reRender="subTabs"
										immediate="true">
										<a4j:support event="onclick" action="#{editPerson.changeUpdTab('updPerson')}"></a4j:support>
									</h:commandButton>
			
									
								</div>
							
									
									<s:decorate template="/layout/displayButton.xhtml"	styleClass="button_form">
										<a4j:commandButton value="Buscar" ajaxSingle="true"
											action="#{editPerson.searchDocument(editPerson.person)}"
											styleClass="button" reRender="updDocGridForm, updPersonDocForm">
					
										</a4j:commandButton>
										<rich:spacer width="20px" />
										<a4j:commandButton value="Cancelar"
											action="#{editPerson.cancelData()}"
											reRender="updPersonDocForm" styleClass="button"
											oncomplete="window.location.reload()"/>
					
									</s:decorate>
									
								</h:panelGrid>
								
						</rich:panel>
					</a4j:form>
					
					<a4j:form id="updDocGridForm" ajaxSingle="true">
						<rich:datascroller align="center" for="updPersonDocGrid"
							maxPages="15" page="#{dataTableScrollerBean.scrollerPage}"
							renderIfSinglePage="false" />
								   			
						<div style="clear: both;" />
						<rich:panel styleClass="table_add" rendered="#{not empty editPerson.personDocSearch}">
						<rich:dataTable id="updPersonDocGrid"
							var="doc" rows="3"
							value="#{editPerson.personDocSearch}"
							rendered="#{not empty editPerson.personDocSearch}"
							rowClasses="rvgRowOne,rvgRowTwo"
							style="width:70%; margin-left:15%;">
							
							<rich:column>
								<f:facet name="header"><h:outputText value="Tipo Doc." /></f:facet>
								
								<h:outputText value="#{convertAssist.getRefDetDescrip(doc.idDocumentType)}" />
							</rich:column>
			
							<rich:column>
								<f:facet name="header"><h:outputText value="Numero" /></f:facet>
								
								<h:outputText value="#{doc.document}" />
							</rich:column>
							
							<rich:column>
								<f:facet name="header"><h:outputText value="Pais" /></f:facet>
								
								<h:outputText value="#{convertAssist.getCountryDescById(doc.idCountry)}" />
							</rich:column>
							
							<rich:column>
								<f:facet name="header"><h:outputText value="Activo" /></f:facet>
								
								<h:outputText value="#{convertAssist.booleanToString(doc.status)}" />
							</rich:column>
							
							<rich:column>
								<f:facet name="header"><h:outputText value="Primario" /></f:facet>
								
								<h:outputText value="#{convertAssist.booleanToString(doc.isDefault)}" />
							</rich:column>
			
							
			
							<rich:column>
								<f:facet name="header"><h:outputText value="Operaciones" /></f:facet>
								
								<a4j:commandButton id="DocumentDelete" value="Borrar"
									action="#{editPerson.docToDelete(doc.id)}"
									image="/img/icons/delete_data.png"
									onclick="if (!confirm('Esta usted seguro que quiere borrar el registro ?')) return false"
									reRender="updDocGridForm"  />
								<rich:toolTip value="Borrar" for="DocumentDelete" />
								<rich:spacer width="20" />
								<a4j:commandLink id="DocEdit"  action="#{editPerson.docToEdit(doc.id)}"
									oncomplete="#{rich:component('PersonDocModalPanel')}.show()"
									reRender="PersonDocModalPanel"
									immediate="true">
		
									<h:graphicImage id="DocDeleteImg" url="/img/icons/edit.png"
										styleClass="actionsImages" />
								</a4j:commandLink>
								<rich:toolTip value="Editar Documento" for="DocEdit" />
								
								
								
							</rich:column>
			
						</rich:dataTable>
						</rich:panel>
					
					</a4j:form>
					
					
					<rich:modalPanel  id="PersonDocModalPanel" minwidth="800" minheight="300"
						resizeable="false" autosized="true" >
						<f:facet name="header">
							<h:panelGroup>
								<h:outputText value="Actualizar Documento" />
							</h:panelGroup>
						</f:facet>
						<f:facet name="controls">
							<h:panelGroup>
								<h:graphicImage value="/img/close.png" style="cursor:pointer"
									id="hideEditDoc" />
								<rich:componentControl for="PersonDocModalPanel"
									attachTo="hideEditDoc" operation="hide" event="onclick" />
							</h:panelGroup>
						</f:facet>
						<h:panelGroup id="GroupDoc">
						<!--  **** Include of the update page ****  -->
							<a4j:include viewId="/fms/fms/maintenances/fmsPersonDocEdit.xhtml" />
						</h:panelGroup>
					</rich:modalPanel>
				</rich:tab>
				
				<rich:tab label="Telefonos" switchType="ajax" id="updPersonPhone" ajaxSingle="true">
					<a4j:form id="updPersonPhoneForm" ajaxSingle="true">
					<a4j:outputPanel id="ToMsg"> 
						<h:messages globalOnly="false" styleClass="message"/>
					</a4j:outputPanel>
					<!-- ************************************ -->
					<!-- ***** PHONES UPDATE ***** -->
					<!-- ************************************ -->
					
						<rich:panel  styleClass="form">
						<f:facet name="header"><h:outputText value="Filtros" /></f:facet>
							<h:panelGrid>
								<div class="attributes">
									<s:decorate template="/layout/input.xhtml">
										<ui:define name="label">Codigo</ui:define>
										<h:inputText styleClass="upper" id="PersonPhoneCode" maxlength="20"
											value="#{editPerson.person.cod}"
											required="true"
											requiredMessage="Favor introduzca un codigo"
										    size="5"
											validatorMessage="El codigo no puede ser menor a 3 o mayor a 5">
											<f:validateLength minimum="3" maximum="5" />
											<a4j:support event="onblur"></a4j:support>
										</h:inputText>
										<div class="msg_container">
											<rich:message for="PersonPhoneCode" />
										</div>
									</s:decorate>
									<div style="clear: both;" />
									
									<h:commandButton value="Volver a persona"
										reRender="subTabs"
										immediate="true">
										<a4j:support event="onclick" action="#{editPerson.changeUpdTab('updPerson')}"></a4j:support>
									</h:commandButton>
			
									
								</div>
							
									
									<s:decorate template="/layout/displayButton.xhtml"	styleClass="button_form">
										<a4j:commandButton value="Buscar" ajaxSingle="true"
											action="#{editPerson.searchPhone(editPerson.person)}"
											styleClass="button" reRender="updPhoneGridForm, updPersonPhoneForm">
					
										</a4j:commandButton>
										<rich:spacer width="20px" />
										<a4j:commandButton value="Cancelar"
											action="#{editPerson.cancelData()}"
											reRender="updPersonPhoneForm" styleClass="button"
											oncomplete="window.location.reload()"/>
					
									</s:decorate>
									
								</h:panelGrid>
								
						</rich:panel>
					</a4j:form>
					
					<a4j:form id="updPhoneGridForm" ajaxSingle="true">
						<rich:datascroller align="center" for="updPersonPhoneGrid"
							maxPages="15" page="#{dataTableScrollerBean.scrollerPage}"
							renderIfSinglePage="false" />
								   			
						<div style="clear: both;" />
						<rich:panel styleClass="table_add" rendered="#{not empty editPerson.personPhoneSearch}">
						<rich:dataTable id="updPersonPhoneGrid"
							var="phone" rows="3"
							value="#{editPerson.personPhoneSearch}"
							rendered="#{not empty editPerson.personPhoneSearch}"
							rowClasses="rvgRowOne,rvgRowTwo"
							style="width:70%; margin-left:15%;">
							
							<rich:column>
								<f:facet name="header"><h:outputText value="Tipo Telef." /></f:facet>
								
								<h:outputText value="#{convertAssist.getRefDetDescrip(phone.idPhoneType)}" />
							</rich:column>
			
							<rich:column>
								<f:facet name="header"><h:outputText value="Numero" /></f:facet>
								
								<h:outputText value="#{phone.phone}" />
							</rich:column>
														
							<rich:column>
								<f:facet name="header"><h:outputText value="Activo" /></f:facet>
								
								<h:outputText value="#{convertAssist.booleanToString(phone.status)}" />
							</rich:column>
							
							<rich:column>
								<f:facet name="header"><h:outputText value="Primario" /></f:facet>
								
								<h:outputText value="#{convertAssist.booleanToString(phone.isDefault)}" />
							</rich:column>
			
							
			
							<rich:column>
								<f:facet name="header"><h:outputText value="Operaciones" /></f:facet>
								
								<a4j:commandButton id="PhoneDelete" value="Borrar"
									action="#{editPerson.phoneToDelete(phone.id)}"
									image="/img/icons/delete_data.png"
									onclick="if (!confirm('Esta usted seguro que quiere borrar el registro ?')) return false"
									reRender="updPhoneGridForm" />
								<rich:toolTip value="Borrar" for="PhoneDelete" />
								<rich:spacer width="20" />
								<a4j:commandLink id="PhoneEdit"  action="#{editPerson.phoneToEdit(phone.id)}"
									oncomplete="#{rich:component('PersonPhoneModalPanel')}.show()"
									reRender="PersonPhoneModalPanel"
									immediate="true">
		
									<h:graphicImage id="PhoneDeleteImg" url="/img/icons/edit.png"
										styleClass="actionsImages" />
								</a4j:commandLink>
								<rich:toolTip value="Editar Telefono" for="PhoneEdit" />
								
								
								
							</rich:column>
			
						</rich:dataTable>
						</rich:panel>
					
					</a4j:form>
					
					
					<rich:modalPanel  id="PersonPhoneModalPanel" minwidth="800" minheight="300"
						resizeable="false" autosized="true" >
						<f:facet name="header">
							<h:panelGroup>
								<h:outputText value="Actualizar Telefono" />
							</h:panelGroup>
						</f:facet>
						<f:facet name="controls">
							<h:panelGroup>
								<h:graphicImage value="/img/close.png" style="cursor:pointer"
									id="hideEditPhone" />
								<rich:componentControl for="PersonPhoneModalPanel"
									attachTo="hideEditPhone" operation="hide" event="onclick" />
							</h:panelGroup>
						</f:facet>
						<h:panelGroup id="GroupPhone">
						<!--  **** Include of the update page ****  -->
							<a4j:include viewId="/fms/fms/maintenances/fmsPersonPhoneEdit.xhtml" />
						</h:panelGroup>
					</rich:modalPanel>
				</rich:tab>
				
				
	
				
			</rich:tabPanel>
			
</ui:composition>